import { getMedicalOrderDetail } from "@/apis/order"
import type { MedicalOrderDetail } from "@/types/order"
import { ref } from "vue"

// hooks - 封装状态变量和逻辑 - 多个页面可复用
export const useMedic = (id:string) =>{
    const orderInfo = ref({} as MedicalOrderDetail)
    const getOrderDetail = async () => {
        const res = await getMedicalOrderDetail(id)
        orderInfo.value = res
    }
    getOrderDetail()
    return { orderInfo }
}